package org.rsbot.gui.actions;

import java.awt.Toolkit;
import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Icon;
import javax.swing.KeyStroke;

/**
 * @author Sorcermus
 */
import org.rsbot.gui.ConsolePanel;

public abstract class BaseAction1 extends AbstractAction {

    private static final long serialVersionUID = 6858558832890334531L;
    protected ConsolePanel frame;

    public BaseAction1(ConsolePanel frame) {
        super();
        this.frame = frame;
    }

    public BaseAction1(ConsolePanel frame, String text, Icon icon, String description,
            char accelerator) {
        super(text, icon);
        this.frame = frame;
        putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(accelerator, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
        putValue(SHORT_DESCRIPTION, description);
    }

    public abstract void actionPerformed(ActionEvent e);
}
